package com.atguigu.paymentdemo.service.impl;

import com.atguigu.paymentdemo.entity.WxUser;
import com.atguigu.paymentdemo.mapper.WxUserMapper;
import com.atguigu.paymentdemo.service.WxUserService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WxUserServiceImpl extends ServiceImpl<WxUserMapper, WxUser> implements WxUserService {

    @Override
    public WxUser getWxUserByOpenid(String openid){
        QueryWrapper<WxUser> qw = new QueryWrapper<>();
        qw.eq("open_id",openid);
        WxUser wxUser = baseMapper.selectOne(qw);
        return wxUser;
    }

}
